#pragma once
#include <string>
namespace Util {
constexpr void clr_bit(uint8_t* buf, size_t bit) { buf[bit / 8] &= ~(1 << (bit % 8)); }
constexpr void set_bit(uint8_t* buf, size_t bit, bool val = true) { val ? (buf[bit / 8] |= (1 << (bit % 8))) : (buf[bit / 8] &= ~(1 << (bit % 8))); }
constexpr bool get_bit(uint8_t* buf, size_t bit) { return (buf[bit / 8] >> (bit % 8)) & 1; }
}  // namespace Util
